Nuxt.js で yarn install したら SAOError
やってみたらエラー
code:sh
yarn install v1.16.0
info No lockfile found.
1/4 Resolving packages... /Users/yoshiyuki_sakamoto/.config/yarn/global/node_modules/sao/lib/installPackages.js:108
throw new SAOError(Failed to install ${packageName} in ${cwd})
^
SAOError: Failed to install packages in /Users/yoshiyuki_sakamoto/lgtmoon/nuxtjs
at ChildProcess.<anonymous> (/Users/yoshiyuki_sakamoto/.config/yarn/global/node_modules/sao/lib/installPackages.js:108:15)
at ChildProcess.emit (events.js:200:13)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:200:13)
at Pipe.<anonymous> (net.js:586:12) {
__sao: true
}
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-nuxt-app
Arguments: nuxtjs
Directory: /Users/yoshiyuki_sakamoto/lgtmoon
Output:
とりあえず最新の node をインストール
code:sh
$ nodebrew install v15.14.0
$ nodebrew use v15.14.0
$ node --version
v15.14.0
yarn もバージョンアップ
code:sh
# yarn install した時のバージョン表記
yarn install v1.16.0
$ npm uninstall yarn -g
$ npm install yarn -g
$ yarn --version
1.22.10
成功したので、多分 node のバージョンが悪かった